<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org" xmlns:layout="http://www.ultraq.net.nz/web/thymeleaf/layout"
      layout:decorator="~{common/admin-edit-template}">
<head>
    <title>修改</title>
    <link rel="styleSheet" href="/bower_components/zTree_v3/css/metroStyle/metroStyle.css">
</head>
<body class="hold-transition skin-green-light  sidebar-mini">

<div layout:fragment="content">
    <!-- Content Header (Page header) -->

    <!-- Main content -->
    <section class="content container-fluid">
        <!-- edit or add box -->
        <div class="page-edit box box-default" data-widget="box-widget">

            <form id="form-oper" role="form" data-toggle="validator">
                <input id="hidden-id" type="hidden" name="id" th:value="${entity.id}">
                <div class="box-body">
                    <div class='form-group '>
                        <label>用户名</label>
                        <input class='form-control' type='text' name="username" th:value="${entity.username}"
                               maxlength="20" required>
                        <div class='help-block with-errors'></div>
                    </div>
                    <div class='form-group '>
                        <label>密码</label>
                        <input class='form-control' type='password' name="password"
                               maxlength="20">
                        <div class='help-block with-errors'></div>
                    </div>
                    <div class="form-group">
                        <label>角色</label>
                        <input class="form-control" readonly type="text" name="roleId" data-role="ztree-select"
                               th:attr="data-ztree-data=${json}" th:value="${entity.roleId}">
                        <div class='help-block with-errors'></div>
                    </div>
                    <div class='form-group '>
                        <label>姓名</label>
                        <input class='form-control' type='text' name="nickname" th:value="${entity.nickname}"
                               maxlength="20"
                               required>
                        <div class='help-block with-errors'></div>
                    </div>
                    <div class='form-group '>
                        <label>手机号</label>
                        <input class='form-control' type='text' name="phone" th:value="${entity.phone}" maxlength="20"
                               required>
                        <div class='help-block with-errors'></div>
                    </div>
                    <div class='form-group '>
                        <label>电子邮箱</label>
                        <input class='form-control' type='text' name="email" th:value="${entity.email}" maxlength="20"
                               required>
                        <div class='help-block with-errors'></div>
                    </div>
                    <div class='form-group '>
                        <label>头像</label>
                        <input class='form-control' type='text' data-role='photocrop' name="photoUrl"
                               th:value="${entity.photoUrl}">
                        <div class='help-block with-errors'></div>
                    </div>
                    <div class='form-group '>
                        <label>备注</label>
                        <input class='form-control' type='text' name="remarks" th:value="${entity.remarks}"
                               maxlength="20"
                               required>
                        <div class='help-block with-errors'></div>
                    </div>
                    <div class='form-group '>
                        <label>状态</label>
                        <select class='form-control' name="enable">
                            <option value="true" th:selected="${true == entity.enable}">启用</option>
                            <option value="false" th:selected="${false == entity.enable}">禁用</option>
                        </select>
                        <div class='help-block with-errors'></div>
                    </div>

                </div>
                <!-- /.box-body -->
                <div class="box-footer">
                    <button type="button" class="btn btn-danger pull-right" onclick="operate.cancel()">取消</button>
                    <button type="submit" class="btn btn-primary pull-right btn-submit">提交
                    </button>
                </div>
                <!-- /.box-footer -->
            </form>
            <!--/.form -->
            <div class="overlay" style="display: none">
                <i class="fa fa-refresh fa-spin"></i>
            </div>
            <!-- /.loading overlay-->
        </div>
        <!-- /.edit or add box -->
    </section>
    <!-- /.content -->
</div>
<!-- /.content-wrapper -->


<div layout:fragment="page-js">
    <script src="/bower_components/zTree_v3/js/jquery.ztree.all.js"></script>
    <script src="/bower_components/zTree_v3/js/bootstrap-ztree.js"></script>
    <script src="/dist/js/pages/user/user-edit.js"></script>
</div>


</body>
</html>